from abc import ABC, abstractmethod

class BaseNode(ABC):

    @classmethod
    @abstractmethod
    def parse(self, node):
        pass
    
    @abstractmethod
    def to_proto(self):
        pass
    
    @property
    def name(self):
        return self._name

    @name.setter
    def name(self, name):
        self._name = name

    @property
    def op_type(self):
        return self._op_type


